Modern luminaries are typically equipped with various electronic components for efficient operation and commissioning (e.g., activation, functional testing, etc.) of the luminaries. Some of these electronic components, such as motion sensors and emergency battery test switches need to be positioned within the luminaire such that they have a line of sight to detect motion/occupancy in a room and/or are easily accessible/viewable during commissioning operations such as functional testing (e.g., emergency unit testing) of the luminaire. A lens of the luminaire provides a desirable location to position the electronic components since the lens faces the area that is to be illuminated, e.g., room and hence has a line of sight to detect motion in the room and is easily accessible or viewable to a user in the room. However, conventional lenses do not lend to the capability of mounting electronic components on the lens in a position that allows for a line of sight and/or easy accessibility. Further, electrical wires attached to the electronic components may affect an aesthetic appeal of the luminaire in an undesirable manner. Therefore, there is a need for a technology that facilitates mounting of electronic components on a luminaire such that the electronic components have a line of sight with the external environment and/or are easily accessible/viewable without compromising the aesthetic appeal of the luminaire.